import httpRequest from '@/request'
import appConfig from '@/config/index'

// 角色列表分页
export function roleList () {
  return httpRequest({
    url: `${appConfig.api}role/list`,
    method: 'post',
  })
}

// 新增角色
export function roleInsert (params: any) {
  return httpRequest({
    url: `${appConfig.api}role/create`,
    method: 'post',
    data: params
  })
}

// 编辑角色
export function roleUpdate (params: any) {
  return httpRequest({
    url: `${appConfig.api}role/update`,
    method: 'post',
    data: params
  })
}

// 删除角色
export function roleDelete (params: any) {
  return httpRequest({
    url: `${appConfig.api}role/delete`,
    method: 'post',
    data: params
  })
}
